<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%><%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="<%=request.getContextPath()%>/static/common/plugin/bootstrap-3.3.5/css/bootstrap.min.css"/>
<script src="<%=request.getContextPath()%>/static/common/plugin/jquery.min.js"></script>
<script src="<%=request.getContextPath()%>/static/common/plugin/bootstrap-3.3.5/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="<%=request.getContextPath()%>/static/common/plugin/nice-validator-0.8.1/jquery.validator.css">
<script type="text/javascript" src="<%=request.getContextPath()%>/static/common/plugin/nice-validator-0.8.1/jquery.validator.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/static/common/plugin/nice-validator-0.8.1/local/zh-CN.js"></script>
<title>试卷详情</title>
<style>
.table-bordered tr th{
	width:200px;
}
</style>
</head>

<body>
<div id="result_15" class="tip-ok" style="display:none">提交成功</div>
<form action="<%=request.getContextPath()%>/teach/testpaper/TestPaperServlet?command=paperAdd"  method="post"  id="demo_15" autocomplete="off"
    data-validator-option="{theme:'simple_right'}">
    <table class="table table-bordered" style="background: #a8c7ce" >
      <tr>
         <th>试卷名称</th>
         <td height="20"  ><input type="text"  name="name"  id="name" data-rule="试卷名称:required;name" placeholder="试卷名称"><span id="nameInfo"></span> </td>
      </tr>
       <tr>
         <th>试卷类型</th>
         <td height="20" >
         <select name="paperType" >
      	  <option value="1">平时测试</option>
      	  <option value="2">结业考试</option>
         </select>
         </td>
      </tr>
       <tr>
         <th>所属课程</th>
         <td height="20" >
         <select name="courseName">
      	 <c:forEach items="${condition }" var="c">
      	  <option value="${c.courseId }">${c.courseName }</option>
      	 </c:forEach>
         </select> </td>
      </tr>
       <tr>
         <th>总分分数</th>
         <td height="20" ><input type="text"  name="totalPoint"  id="totalPoint" data-rule="总分数:required;totalPoint;" placeholder="输入 大于或等于0的数" >
          <span id="totalPointInfo"></span></td>
      </tr>
        <tr>
         <th>通过分数</th>
         <td height="20" ><input type="text"  name="passPoint"  id="passPoint" data-rule="通过分数:required;passPoint;" placeholder="输入 大于或等于0的数"> 
         <span id="passPointInfo" ></span></td>
      </tr>
        <tr>
         <th>总时间</th>
         <td height="20" ><input type="text"  name="totalMinutes"  id="totalMinutes"data-rule="考试时间:required;totalPoint;" placeholder="输入 大于或等于0的数">
         <span id="totalMinutesInfo" ></span> </td>
      </tr>
       <tr>
         <th>单选题数</th>
         <td height="20" ><input type="text"  name="singleOptionNumber"  id="singleOptionNumber" data-rule="判断题数:required;singleOptionNumber;" placeholder="输入 大于或等于0的数"> 
         <span id="singleOptionEachPointInfo"></span></td>
      </tr>
       <tr>
         <th>单选分数</th>
         <td height="20" ><input type="text"  name="singleOptionEachPoint"  id="singleOptionEachPoint"data-rule="单选题分数:required;singleOptionEachPoint;" placeholder="输入 大于或等于0的数"><span id="singleOptionEachPointfo"></span> </td>
      </tr>
       <tr>
         <th>单选难度</th>
         <td height="20">   
         <select name="singleOptionDifficulty">
      	  <option value="1">低</option>
      	  <option value="2">中</option>
      	  <option value="3">较高</option>
      	  <option value="4">高</option>
         </select>
         </td>
      </tr>
       <tr>
         <th>多选题数</th>
         <td height="20" ><input type="text"  name="multiOptionNumber"  id="multiOptionNumber"data-rule="判断题数:required;multiOptionNumber;" placeholder="输入 大于或等于0的数">
         <span id="multiOptionNumberInfo"></span> </td>
      </tr>
       <tr>
         <th>多选分数</th>
         <td height="20" ><input type="text"  name="multiOptionEachPoint"  id="multiOptionEachPoint" data-rule="多选题分数:required;multiOptionEachPoint;" placeholder="输入 大于或等于0的数">
         <span id="multiOptionEachPointInfo"></span> </td>
      </tr>
     
        <tr>
         <th>多选难度</th>
         <td height="20" >
           <select name="multiOptionDifficulty">
        
      	  <option value="1">低</option>
      	  <option value="2">中</option>
      	  <option value="3">较高</option>
      	  <option value="4">高</option>
         </select>
         </td>
      </tr>
        <tr>
         <th>判断提数</th>
         <td height="20" ><input type="text"  name="judgeNumber"  id="judgeNumber"data-rule="判断题数:required;judgeNumber;" placeholder="输入 大于或等于0的数"> <span id="judgeNumberInfo"></span></td>
      </tr>
       <tr>
         <th>判断分数</th>
         <td height="20"><input type="text"  name="judgeEachPoint"  id="judgeEachPoint"data-rule="判断分数:required;judgeEachPoint;" placeholder="输入 大于或等于0的数"><span id="judgeEachPointInfo"></span></td>
      </tr>
        <tr>
         <th>判断难度</th>
         <td height="20" >
           <select name="judgeOptionDifficulty">
      	  <option value="1">低</option>
      	  <option value="2">中</option>
      	  <option value="3">较高</option>
      	  <option value="4">高</option>
         </select>
         </td>
      </tr>
       <tr>
         <th>备注</th>
         <td height="20" ><input type="text"  name="memo"  id="memo" data-rule="备注:required;memo"><span id="memoInfo"></span> </td>
      </tr>
      <tr>
					<td>
						<input type="submit" value="提交"/>
					</td>
				</tr>
    </table>
    
  </form>
<script type="text/javascript">
function validate(){
//接收表单验证通过的事件
$('#demo_15').bind('valid.form', function(){
    $.ajax({
        url:"<%=request.getContextPath()%>/teach/testpaper/TestPaperServlet?command=paperAdd",
        type: 'POST',
        data: $(this).serialize(),
        success: function(d){
            $('#result_15').fadeIn(300).delay(2000).fadeOut(500);
        }
    });
 });
  }
</script>
</body>
</html>
